package com.yunxi.service.localService.impl.otd;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.otd.OtdWeekCalendarMapper;
import com.yunxi.model.otd.OtdWeekCalendar;
import com.yunxi.service.localService.otd.OtdWeekCalendarService;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 周生产日历 服务实现类
 * </p>
 *
 * @author XUQI
 * @since 2019-05-17
 */
@Service
public class OtdWeekCalendarServiceImpl extends ServiceImplPlus<OtdWeekCalendarMapper, OtdWeekCalendar> implements
    OtdWeekCalendarService {

    @Override
    public OtdWeekCalendar findCalendarByWeek(String year, String week) {
        return baseMapper.selectCalendarByWeek(year, week);
    }

    @Override
    public Integer checkConflict(Date startDate, Date endDate, String calendarId) {
        return baseMapper.checkConflict(startDate, endDate, calendarId);
    }

    @Override
    public OtdWeekCalendar findCalendarByWeekNum(Integer weekNum) {
        return baseMapper.selectCalendarByWeekNum(weekNum);
    }

    @Override
    public List<OtdWeekCalendar> findWeekCalendarByMonth(String year, String month) {
        return baseMapper.selectWeekCalendarByMonth(year, month);
    }

    @Override
    public List<OtdWeekCalendar> findFivesCalendarByWeek(String year, String week) {
        return baseMapper.selectFivesCalendarByMonth(year, week);
    }

    @Override
    public OtdWeekCalendar findCalendarByDate(Date date) {
        return baseMapper.selectCalendarByDate(date);
    }
}
